<ul class="nav nav-tabs">
	<li ng-class="{'active':pagedata.op=='list'}"><a href="javascript:;" ng-click="access_json('/wxapp.app_web_tpls//web_id='+pagedata.item.web_id)">返回模板</a></li>
	<li class="active"><a href="javascript:;" ng-click="access()">设计</a></li>
	<a class="label label-primary r" style="padding:8px;margin-top:6px;border-radius: 4px" href="javascript:;" ng-click="post(pagedata.item,'design')">保存DIY页面</a>
</ul>
<div id="editform" class="form-horizontal form">
<link rel="stylesheet" type="text/css" href="../core/resource/css/jinyunicon.css">
<link href="../core/resource/css/diy.css?v={urlargs}" rel="stylesheet">
<style>
.table td span{display:inline-block;margin-top:4px;}
.table td input{margin-bottom:0;}
</style>
<script language="javascript">require(['underscore']);</script>
<script type="text/javascript" src="../core/resource/js/hhSwipe.js"></script>
<script type="text/javascript" src="../core/resource/components/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="../core/resource/components/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="../core/resource/components/ueditor/ueditor.parse.js"></script>
<script type="text/javascript" src="../core/resource/components/ueditor/lang/zh-cn/zh-cn.js"></script>
    <div class="row diy-page" style="height:100%;" ng-init="pagedata.index=-1;pagedata.editdata=pagedata.item.setting;">
		<div class="col-md-4" style="overflow: auto;height:800px;width:23%;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd;margin-bottom:20px">
				<div class="form-group" style="padding-top:10px">
					<a class="jylabel jylabel-f60-0" ng-class="{'active':pagedata.basictype==0}" ng-click="pagedata.basictype=0" class="btn">展示组件</a>
					<a class="jylabel jylabel-f60-0" ng-class="{'active':pagedata.basictype==1}" ng-click="pagedata.basictype=1" class="btn">辅助组件</a>
					<a class="jylabel jylabel-f60-0" ng-class="{'active':pagedata.basictype==3}" ng-click="pagedata.basictype=3" class="btn">应用组件</a>
					<a class="jylabel jylabel-f60-0" ng-class="{'active':pagedata.basictype==2}" ng-click="pagedata.basictype=2" class="btn">基本设置</a>
				</div>
				<div class="diy-menu" ng-show="pagedata.basictype==0">
					<div class="navs">
						<div class="form-group-title" style="margin-bottom:0;border:0">展示组件</div>
						<div class="fui-icon-group col-3" style="border-left: 1px solid #ebebeb;">
							<div class="fui-icon-col external item" ng-repeat="nav in pagedata.navs0" ng-click="func.add(nav)">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon {{nav.icon || 'icon-all'}}"></i></div>
								<div class="text">{{nav.title}}</div>
							</div>
						</div>
					</div>
				</div>
				<div class="diy-menu" ng-show="pagedata.basictype==1">
					<div class="navs">
						<div class="form-group-title" style="margin-bottom:0;border:0">辅助组件</div>
						<div class="fui-icon-group col-3" style="border-left: 1px solid #ebebeb;">
							<div class="fui-icon-col external item" ng-repeat="nav in pagedata.navs1" ng-click="func.add(nav)">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon {{nav.icon || 'icon-all'}}"></i></div>
								<div class="text">{{nav.title}}</div>
							</div>
						</div>
					</div>
				</div>
				<div class="diy-menu" ng-show="pagedata.basictype==3">
					<div class="navs" ng-repeat="item in pagedata.navs2">
						<div class="form-group-title" style="margin-bottom:0;border:0">{{item.plugintitle}}</div>
						<div class="fui-icon-group col-3" style="border-left: 1px solid #ebebeb;">
							<div class="fui-icon-col external item" ng-repeat="nav in item.navs" ng-click="func.add(nav)">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon {{nav.icon || 'icon-all'}}"></i></div>
								<div class="text">{{nav.title}}</div>
							</div>
						</div>
					</div>
					<div class="content-empty" ng-if="!pagedata.navs2 || pagedata.navs2.length <1 ">
						  <i class="icon jinyunicon icon-cry" style="width: 30px;margin-bottom: 20px;font-size:30px"></i><br/><p style="color: #999;font-size: 13px">暂时没有能支持的组件！</p>
					</div>
				</div>
				<div class="diy-menu" ng-show="pagedata.basictype==2">
					<div class="navs">
						<div class="form-group-title" style="margin-bottom:0;border:0">基本设置</div>
						<div class="fui-icon-group col-3" style="border-left: 1px solid #ebebeb;">
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='top';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-shuffling-banner"></i></div>
								<div class="text">顶部设置</div>
							</div>
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='footer';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-column1"></i></div>
								<div class="text">底部设置</div>
							</div>
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='bg';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-bianji"></i></div>
								<div class="text">背景设置</div>
							</div>
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='guide';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-pinpai"></i></div>
								<div class="text">关注按钮</div>
							</div>
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='fodong';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-rfqquantity"></i></div>
								<div class="text">悬浮按钮</div>
							</div>
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='kefu';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-kefu"></i></div>
								<div class="text">客服</div>
							</div>
							<div class="fui-icon-col external item" ng-click="pagedata.basicset='phone';pagedata.edit=1;pagedata.editdata=pagedata.item.setting">
								<div class="badge"></div>
								<div class="icon icon-green radius"><i class="icon jinyunicon icon-phone"></i></div>
								<div class="text">电话</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="diy-left" style="height:800px;width:32%;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd;margin-bottom:20px">
			<div class="diy-phone">
				<div class="phone-head"></div>
				<div class="phone-body">
					<div ng-click="pagedata.basicset='top';pagedata.edit=1;pagedata.editdata=pagedata.item.setting" class="phone-title" style="background: url(../core/resource/images/diy/{{pagedata.item.setting.window.navigationBarTextStyle || 'white'}}.png) center top / 100% no-repeat scroll {{pagedata.item.setting.window.navigationBarBackgroundColor || '#333'}}; color:{{pagedata.item.setting.window.navigationBarTextStyle}}">{{pagedata.item.setting.window.navigationBarTitleText}}</div>
					<div class="phone-main ui-sortable" id="phone" style="background-color: {{pagedata.item.setting.window.backgroundColor || '#fff'}};">
						<div id="editor" style="background: url('{{tomedia(pagedata.item.setting.bg.bgimg)}}') no-repeat;background-size:cover;min-height: 600px">
							<div style="height: 50px;" ng-show="pagedata.item.setting.isguide==1"></div>
							<div ng-repeat="inav in pagedata.item.items track by $index" class="drag" name="{{pagedata.used_navs[inav.nid].name}}" ng-class="{'selected':pagedata.index==$index}" ng-click="pagedata.edit=2;pagedata.edithtml=pagedata.used_navs[inav.nid].edithtml;pagedata.editdata=inav.params;pagedata.index=$index;">
                                <div class="btn-edit-del" ng-show="pagedata.index==$index" ng-click="pagedata.index=$index-1;pagedata.item.items.splice($index,1)"></div>
								<div ng-include="tomedia(pagedata.used_navs[inav.nid].showhtml)" class="fe-mod-parent" ></div>
                            </div>
                            <!-- 浮动按钮 -->
                            <div ng-click="pagedata.basicset='fodong';pagedata.edit=1;pagedata.editdata=pagedata.item.setting" class="fe-floatico" style="position: absolute; width:{{pagedata.item.setting.fodong.width || '35px'}};top:{{pagedata.item.setting.fodong.top || '120px'}}" ng-show="pagedata.item.setting.isfodong==1" ng-class="{'fe-floatico-right':pagedata.item.setting.fodong.style=='right'}">
                                <img ng-src="{{tomedia(pagedata.item.setting.fodong.img) || '../core/resource/images/diy/icon-ad.png'}}" style="height:100%; width: 100%;"/>
                            </div>
							<!-- 客服按钮 -->
                            <div ng-click="pagedata.basicset='kefu';pagedata.edit=1;pagedata.editdata=pagedata.item.setting" class="fe-floatico" style="position: absolute; width:{{pagedata.item.setting.kefu.width || '35px'}};top:{{pagedata.item.setting.kefu.top || '220px'}}" ng-show="pagedata.item.setting.iskefu==1" ng-class="{'fe-floatico-right':pagedata.item.setting.kefu.style=='right'}">
                                <img ng-src="{{tomedia(pagedata.item.setting.kefu.img) || '../core/resource/images/diy/icon-kefu.png'}}" style="height:100%; width: 100%;"/>
                            </div>
							<!-- 电话按钮 -->
                            <div ng-click="pagedata.basicset='phone';pagedata.edit=1;pagedata.editdata=pagedata.item.setting" class="fe-floatico" style="position: absolute; width:{{pagedata.item.setting.phone.width || '35px'}};top:{{pagedata.item.setting.phone.top || '280px'}}" ng-show="pagedata.item.setting.isphone==1" ng-class="{'fe-floatico-right':pagedata.item.setting.phone.style=='right'}">
                                <img ng-src="{{tomedia(pagedata.item.setting.phone.img) || '../core/resource/images/diy/icon-phone.png'}}" style="height:100%; width: 100%;"/>
                            </div>
                            <!-- 关注按钮 -->
                            <div ng-click="pagedata.basicset='guide';pagedata.edit=1;pagedata.editdata=pagedata.item.setting" class="fe-guide" ng-show="pagedata.item.setting.isguide==1" style="display:block;background-color:{{pagedata.item.setting.guide.bgcolor}};z-index:890;opacity:{{pagedata.item.setting.guide.opacity}}">
                                <div class="fe-guide-faceimg"><img ng-src="{{tomedia(pagedata.account.logo) || '../core/resource/images/nopic.jpg'}}" style="border-radius:{{pagedata.item.setting.guide.facestyle}}" /></div>
                                <div class="fe-guide-sub" style="color:{{pagedata.item.setting.guide.navcolor}};background-color:{{pagedata.item.setting.guide.navbgcolor}}">{{pagedata.item.setting.guide.sub ||'立即关注'}}</div>
                                <div class="fe-guide-text"  style="font-size:{{pagedata.item.setting.guide.size}};color:{{pagedata.item.setting.guide.color}}">
                                    <p ng-class="{'fe-guide-lineheight':pagedata.item.setting.guide.title2==''}">{{pagedata.item.setting.guide.title1s || '加关注，做代理。'}}</p>
                                    <p ng-class="{'fe-guide-lineheight':pagedata.item.setting.guide.title1==''}">{{pagedata.item.setting.guide.title2s || '关注公众号，享专属服务'}}</p>
                                </div>
                            </div>
						</div>
						<div ng-show="pagedata.item.setting.isfooter==1" class="fui-navbar" ng-click="pagedata.basicset='footer';pagedata.edit=1;pagedata.editdata=pagedata.item.setting"  style="background:{{pagedata.item.setting.footer.backgroundColor || '#fff'}}">
							<a href="javascript:;" class="external nav-item" ng-repeat="menu in pagedata.item.setting.footer.menus">
								<span ng-if="pagedata.item.setting.footer.iconstyle == 0 && pagedata.item.setting.footer.position == 'bottom' && $index!=0" class="icon"><img ng-src="{{tomedia(menu.iconimg) || '../core/resource/images/diy/icon/gray_home.png'}}" style="width:22px;height:22px"/></span>
								<span ng-if="pagedata.item.setting.footer.iconstyle == 1 && pagedata.item.setting.footer.position == 'bottom' && $index!=0" class="icon jinyunicon {{menu.icon}}"  style="color: {{pagedata.item.setting.footer.color || '#808080'}};"></span>
								<span ng-if="pagedata.item.setting.footer.iconstyle == 0 && pagedata.item.setting.footer.position == 'bottom' && $index==0" class="icon"><img ng-src="{{tomedia(menu.choseimg) || '../core/resource/images/diy/icon/green_home.png'}}" style="width:22px;height:22px"/></span>
								<span ng-if="pagedata.item.setting.footer.iconstyle == 1 && pagedata.item.setting.footer.position == 'bottom' && $index==0" class="icon jinyunicon {{menu.icon}}"  style="color: {{pagedata.item.setting.footer.selectedColor || main.customsyscolor}};"></span>
								<span ng-if="$index!=0" class="label" style="color: {{pagedata.item.setting.footer.color || '#808080'}};">{{menu.title}}</span>
								<span ng-if="$index==0" class="label" style="color: {{pagedata.item.setting.footer.selectedColor || main.customsyscolor}};">{{menu.title}}</span>
							</a>
						</div>
					</div>
				</div>
				<div class="phone-foot"></div>
			</div>
		</div>
			<div class="col-md-4" style="overflow: auto;height:800px;width:45%;border-bottom: 1px solid #ddd;margin-bottom:20px">
				<div class="diy-editor" ng-if="pagedata.edit==2">
						<div class="inner" >
							<div style="min-height:350px" ng-include="tomedia(pagedata.edithtml)" onload="start()"></div>
						</div>
				</div>
				<div class="diy-editor" ng-if="pagedata.edit==1">
						<div class="inner" ng-if="pagedata.basicset=='top'">
							<div class="form-group-title">顶部导航设置</div>
								<div class="alert alert-success alert-dismissable">
											<em>统一《全局设置》里面设置</em>
								</div>
						</div>
						<div class="inner" ng-if="pagedata.basicset=='footer'">
							<div class="form-group-title">底部导航设置</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">是否显示</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="1" ng-model="pagedata.editdata.isfooter" /> 显示</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="0" ng-model="pagedata.editdata.isfooter" /> 不显示</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">背景颜色</div>
									<div class="col-sm-8">
										<div class="input-group input-group-sm">
											<input class="form-control input-sm diy-bind color" ng-model="pagedata.editdata.footer.backgroundColor" type="color" />
											<span  class="input-group-addon">{{pagedata.editdata.footer.backgroundColor || '#fff'}}</span>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">底部窗口的背景色</div>
									<div class="col-sm-4">
										<div class="alert alert-success alert-dismissable">
											<em>统一《全局设置》里面设置</em>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">字体颜色</div>
									<div class="col-sm-8">
										<div class="input-group input-group-sm">
											<input class="form-control input-sm diy-bind color" ng-model="pagedata.editdata.footer.color" type="color" />
											<span  class="input-group-addon">{{pagedata.editdata.footer.color || '#333'}}</span>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">选中颜色</div>
									<div class="col-sm-8">
										<div class="input-group input-group-sm">
											<input class="form-control input-sm diy-bind color" ng-model="pagedata.editdata.footer.selectedColor" type="color" />
											<span  class="input-group-addon">{{pagedata.editdata.footer.selectedColor || '#f60'}}</span>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">边框的颜色</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="white" ng-model="pagedata.editdata.footer.borderStyle" /> white</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="black" ng-model="pagedata.editdata.footer.borderStyle" /> black</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">TabBar的位置</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="top" ng-model="pagedata.editdata.footer.position" /> top</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="bottom" ng-model="pagedata.editdata.footer.position" /> bottom</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标？</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="0" ng-model="pagedata.editdata.footer.iconstyle" /> 图片图标</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="1" ng-model="pagedata.editdata.footer.iconstyle" /> 字体图标</label>
									</div>
								</div>
								<div class="form-items indent">
								<div class="inner" ng-init="checkarray(pagedata.editdata.footer,'menus')">
									<div class="item" ng-repeat="menu in pagedata.editdata.footer.menus">
										<span class="btn-del" title="删除" ng-click="pagedata.editdata.footer.menus.splice($index,1)"></span>
										<div class="item-body">
											<div class="item-image square" ng-if="pagedata.editdata.footer.iconstyle == 1">
												<div class="icon-main">
													<span class="icon jinyunicon {{menu.icon}}"></span>
												</div>
												<div class="text" ng-click="modal_func(menu,'icon','tools.icon','','core','from=jinyunicon')">图标</div>
											</div>
											<div class="item-images" ng-if="pagedata.editdata.footer.iconstyle == 0">
												<div class="item-image2" ng-click="image(menu,'iconimg')">
													<img class="" ng-src="{{tomedia(menu.iconimg) || '../core/resource/images/diy/icon/gray_home.png'}}" style="height:50px; width: 50px;"/>
												</div>
												<div class="item-image2" ng-click="image(menu,'choseimg')">
													<img class="" ng-src="{{tomedia(menu.choseimg) || '../core/resource/images/diy/icon/green_home.png'}}" style="height:50px; width: 50px;"/>
												</div>
											</div>
											<div class="item-form">
												<div class="input-group" style="margin-bottom:0px; ">
													<span class="input-group-addon">文字</span>
													<input type="text" class="form-control input-sm diy-bind" ng-model="menu.title" placeholder="留空则不显示" maxlength="20">
												</div>
												<div class="input-group" style="margin-top:10px; margin-bottom:0px; ">
													<input type="text" class="form-control input-sm diy-bind" placeholder="请选择链接或输入链接地址" ng-model="menu.url">
													<span class="input-group-addon btn btn-info" ng-click="pagedata.choose_url(menu,'url')">选择链接</span>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="btn btn-w-m btn-block btn-info btn-outline" ng-click="pagedata.editdata.footer.menus.push({'text':'按钮文字'});"><i class="fa fa-plus"></i> 添加一个</div>
							</div>
						</div>
						<div class="inner" ng-if="pagedata.basicset=='bg'">
							<div class="form-group-title">窗口设置</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">背景颜色</div>
									<div class="col-sm-4">
										<div class="alert alert-success alert-dismissable">
											<em>统一《全局设置》里面设置</em>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">背景图片</div>
									<div class="col-sm-10">
										<div class="fe-panel-editor-upload" ng-click="image(pagedata.editdata.bg,'bgimg')">
											<img ng-show="pagedata.editdata.bg.bgimg" ng-src="{{tomedia(pagedata.editdata.bg.bgimg)}}" style="height:280px; width: 192px;"/>
											<div class="fe-panel-editor-upload-choose2" ng-show="pagedata.editdata.bg.bgimg">重新选择背景图片</div>
											<div class="fe-panel-editor-upload-choose1" ng-show="!pagedata.editdata.bg.bgimg"><i class="fa fa-plus-circle"></i> 选择图片</div>
										</div>
										<div class="fe-panel-editor-upload-choose1" ng-show="pagedata.editdata.bg.bgimg" >
											<button class="clip btn btn-default"  ng-click="pagedata.editdata.bg.bgimg=''">重置/取消</button>
										</div>
									</div>
								</div>
						</div>
						<div class="inner" ng-if="pagedata.basicset=='guide'">
								<div class="form-group-title">关注按钮设置</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">关注按钮</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="1" ng-model="pagedata.editdata.isguide" /> 显示</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="0" ng-model="pagedata.editdata.isguide" /> 不显示</label>
										<div class="help-block">提示:仅在未关注时显示</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">默认标题1</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="邀请人不存在的时候显示" ng-model="pagedata.editdata.guide.title1" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">默认标题2</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="推荐人不存在的时候显示" ng-model="pagedata.editdata.guide.title2" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">邀请标题1</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="可调用变量 [邀请人]、[访问者]" ng-model="pagedata.editdata.guide.title1s" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">邀请标题2</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="可调用变量 [邀请人]、[访问者]" ng-model="pagedata.editdata.guide.title2s" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">按钮文字</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="按钮文字" ng-model="pagedata.editdata.guide.sub" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">标题大小</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="8px" ng-model="pagedata.editdata.guide.size" /> 8像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="10px" ng-model="pagedata.editdata.guide.size" /> 10像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="12px" ng-model="pagedata.editdata.guide.size" /> 12像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="14px" ng-model="pagedata.editdata.guide.size" /> 14像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.guide.size" /></label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">透明度</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input2" type="text" ng-model="pagedata.editdata.guide.opacity">
										<span class="tips">例:0.8 (请填写0-1之间的数字) 建议填写0.9</span>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">标题颜色</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input2" type="color" ng-model="pagedata.editdata.guide.color">
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">背景颜色</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input2" type="color" ng-model="pagedata.editdata.guide.bgcolor">
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">按钮背景颜色</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input2" type="color" ng-model="pagedata.editdata.guide.navbgcolor">
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">按钮文字颜色</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input2" type="color" ng-model="pagedata.editdata.guide.navcolor">
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">头像样式</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="0px" ng-model="pagedata.editdata.guide.facestyle" /> 正方形</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="40px" ng-model="pagedata.editdata.guide.facestyle" /> 正圆形</label>
									</div>
								</div>
						</div>
						<div class="inner" ng-if="pagedata.basicset=='kefu'">
							<div class="form-group-title">客服设置</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">是否开启客服</div>
									<div class="col-sm-10">
										<label class="radio-inline"><input type="radio" value="1" ng-model="pagedata.editdata.iskefu" /> 开启</label>
										<label class="radio-inline"><input type="radio" value="0" ng-model="pagedata.editdata.iskefu" /> 关闭</label>
										<span style="font-size: 12px; margin-left: 10px;">提示:需到小程序后台添加客服(客服反馈-客服管理)</span>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">客服类型</div>
									<div class="col-sm-10">
											<label class="radio-inline"><input type="radio" value="0" ng-model="pagedata.editdata.kefu.type" /> 微官网</label>
											<label class="radio-inline"><input type="radio" value="1" ng-model="pagedata.editdata.kefu.type" /> 微信小程序</label>
											<label class="radio-inline"><input type="radio" value="2" ng-model="pagedata.editdata.kefu.type" /> 支付宝小程序</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标位置</div>
									<div class="col-sm-10">
										<label style="cursor:pointer;"><input type="radio" name="{{Edit.id}}_floatstyle" value="left" ng-model="pagedata.editdata.kefu.style" /> 居左</label>
										<label style="cursor:pointer;"><input type="radio" name="{{Edit.id}}_floatstyle" value="right" ng-model="pagedata.editdata.kefu.style" /> 居右</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标宽度</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="30px" ng-model="pagedata.editdata.kefu.width" /> 30像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="40px" ng-model="pagedata.editdata.kefu.width" /> 40像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="50px" ng-model="pagedata.editdata.kefu.width" /> 50像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="60px" ng-model="pagedata.editdata.kefu.width" /> 60像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="80px" ng-model="pagedata.editdata.kefu.width" /> 80像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.kefu.width" /></label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">顶部间距</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="80px" ng-model="pagedata.editdata.kefu.top" /> 80像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="100px" ng-model="pagedata.editdata.kefu.top" /> 100像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="120px" ng-model="pagedata.editdata.kefu.top" /> 120像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="150px" ng-model="pagedata.editdata.kefu.top" /> 150像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="180px" ng-model="pagedata.editdata.kefu.top" /> 180像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.kefu.top" /></label>
									</div>
								</div>
								<div class="form-group" ng-show="pagedata.editdata.kefu.type ==0">
									<div class="col-sm-2 control-label">目标链接</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="不可填写js代码 (请以http://开头)" ng-model="pagedata.editdata.kefu.href" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标图片</div>
									<div class="col-sm-10">
										<div class="fe-panel-editor-upload" ng-click="image(pagedata.editdata.kefu,'img')" style="min-height:50px; width: 50px;">
											<img ng-show="pagedata.editdata.kefu.img" ng-src="{{tomedia(pagedata.editdata.kefu.img)}}" width="100%;"/>
											<div class="fe-panel-editor-upload-choose2" ng-show="pagedata.editdata.kefu.img">重选</div>
											<div class="fe-panel-editor-upload-choose1" ng-show="!pagedata.editdata.kefu.img" style="line-height:100%;"><i class="fa fa-plus-circle"></i></div>
										</div>
									</div>
								</div>
						</div>
						<div class="inner" ng-if="pagedata.basicset=='phone'">
							<div class="form-group-title">电话设置</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">是否开启电话</div>
									<div class="col-sm-10">
										<label class="radio-inline"><input type="radio" value="1" ng-model="pagedata.editdata.isphone" /> 开启</label>
										<label class="radio-inline"><input type="radio" value="0" ng-model="pagedata.editdata.isphone" /> 关闭</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标位置</div>
									<div class="col-sm-10">
										<label style="cursor:pointer;"><input type="radio" value="left" ng-model="pagedata.editdata.phone.style" /> 居左</label>
										<label style="cursor:pointer;"><input type="radio" value="right" ng-model="pagedata.editdata.phone.style" /> 居右</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标宽度</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="30px" ng-model="pagedata.editdata.phone.width" /> 30像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="40px" ng-model="pagedata.editdata.phone.width" /> 40像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="50px" ng-model="pagedata.editdata.phone.width" /> 50像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="60px" ng-model="pagedata.editdata.phone.width" /> 60像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="80px" ng-model="pagedata.editdata.phone.width" /> 80像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.phone.width" /></label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">顶部间距</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="80px" ng-model="pagedata.editdata.phone.top" /> 80像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="100px" ng-model="pagedata.editdata.phone.top" /> 100像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="120px" ng-model="pagedata.editdata.phone.top" /> 120像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="150px" ng-model="pagedata.editdata.phone.top" /> 150像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="180px" ng-model="pagedata.editdata.phone.top" /> 180像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.phone.top" /></label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">电话号码</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" ng-model="pagedata.editdata.phone.href" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标图片</div>
									<div class="col-sm-10">
										<div class="fe-panel-editor-upload" ng-click="image(pagedata.editdata.phone,'img')" style="min-height:50px; width: 50px;">
											<img ng-show="pagedata.editdata.phone.img" ng-src="{{tomedia(pagedata.editdata.phone.img)}}" width="100%;"/>
											<div class="fe-panel-editor-upload-choose2" ng-show="pagedata.editdata.phone.img">重选</div>
											<div class="fe-panel-editor-upload-choose1" ng-show="!pagedata.editdata.phone.img" style="line-height:100%;"><i class="fa fa-plus-circle"></i></div>
										</div>
									</div>
								</div>
						</div>
						<div class="inner" ng-if="pagedata.basicset=='fodong'">
							<div class="form-group-title">悬浮设置</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">是否开启悬浮</div>
									<div class="col-sm-10">
										<label class="radio-inline"><input type="radio" value="1" ng-model="pagedata.editdata.isfodong" /> 开启</label>
										<label class="radio-inline"><input type="radio" value="0" ng-model="pagedata.editdata.isfodong" /> 关闭</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标位置</div>
									<div class="col-sm-10">
										<label style="cursor:pointer;"><input type="radio" value="left" ng-model="pagedata.editdata.fodong.style" /> 居左</label>
										<label style="cursor:pointer;"><input type="radio" value="right" ng-model="pagedata.editdata.fodong.style" /> 居右</label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标宽度</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="30px" ng-model="pagedata.editdata.fodong.width" /> 30像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="40px" ng-model="pagedata.editdata.fodong.width" /> 40像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="50px" ng-model="pagedata.editdata.fodong.width" /> 50像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="60px" ng-model="pagedata.editdata.fodong.width" /> 60像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="80px" ng-model="pagedata.editdata.fodong.width" /> 80像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.fodong.width" /></label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">顶部间距</div>
									<div class="col-sm-10">
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="80px" ng-model="pagedata.editdata.fodong.top" /> 80像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="100px" ng-model="pagedata.editdata.fodong.top" /> 100像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="120px" ng-model="pagedata.editdata.fodong.top" /> 120像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="150px" ng-model="pagedata.editdata.fodong.top" /> 150像素</label>
										<label style="cursor:pointer; margin-right: 10px;"><input type="radio" value="180px" ng-model="pagedata.editdata.fodong.top" /> 180像素</label>
										<label style="cursor:pointer; margin-right: 10px;">自定义：<input class="fe-panel-editor-input2" style="line-height: 20px;" value="" ng-model="pagedata.editdata.fodong.top" /></label>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">目标链接</div>
									<div class="col-sm-10">
										<input class="fe-panel-editor-input1" placeholder="不可填写js代码 (请以http://开头)" ng-model="pagedata.editdata.fodong.href" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-2 control-label">图标图片</div>
									<div class="col-sm-10">
										<div class="fe-panel-editor-upload" ng-click="image(pagedata.editdata.fodong,'img')" style="min-height:50px; width: 50px;">
											<img ng-show="pagedata.editdata.fodong.img" ng-src="{{tomedia(pagedata.editdata.fodong.img)}}" width="100%;"/>
											<div class="fe-panel-editor-upload-choose2" ng-show="pagedata.editdata.fodong.img">重选</div>
											<div class="fe-panel-editor-upload-choose1" ng-show="!pagedata.editdata.fodong.img" style="line-height:100%;"><i class="fa fa-plus-circle"></i></div>
										</div>
									</div>
								</div>
						</div>
						
				</div>
			</div>
			</div>
        </div>
</div>
<script type="text/javascript">
scope.pagedata.basictype =0;
scope.pagedata.edit =1;
scope.pagedata.basicset = 'top';
	function fold(){
        width= $(".fe-save").width();
        left = $(".fe-save").css("left");
        left = left.replace("px","");
        if(left>=0){
            $(".fe-save").animate({left:0-width+40+"px"},1000);
            $(".fe-save-fold").addClass("fe-save-fold2");
        }else{
            $(".fe-save").animate({left:"0px"},1000);
            $(".fe-save-fold").removeClass("fe-save-fold2");
        }
    }
	window.scope.func.add=function(nav){
		//console.log(nav);
		window.scope.pagedata.edit=2;
		window.scope.pagedata.used_navs[nav.cloud_id]={'showhtml':nav.showhtml,'edithtml':nav.edithtml};
		var new_item={'nid':nav.cloud_id,'is_new':true};
		new_item.params=angular.copy(nav.default);
		if(!new_item.params || typeof(new_item.params)!='object'){
			new_item.params={};
		}
		window.scope.pagedata.index+=1;
		window.scope.pagedata.item.items.splice(window.scope.pagedata.index,0,new_item);
		window.scope.pagedata.edithtml=nav.edithtml;
		window.scope.pagedata.editdata=window.scope.pagedata.item.items[window.scope.pagedata.index].params;
		//console.log(window.scope.pagedata.editdata);
	}
	window.scope.getnav=function(){
		var key=$('#title').val();
		if(key){
			window.scope.post({},'getnav','title='+key,function(result){
				window.scope.pagedata.navs=result;
				window.scope.$apply();
			});
		}else{
			window.scope.post({},'getnav','',function(result){
				window.scope.pagedata.navs=result;
				window.scope.$apply();
			});
		}
		
	}
	window.scope.lunbo=function(){
		$('.fe-mod-2 .swipe').each(function(){
                        initswipe($(this));
        })
        $('.fe-mod-8-main-img img').each(function(){
            $(this).height($(this).width());    
        });
        $('.fe-mod-12 img').each(function(){
            $(this).height($(this).width());    
        });
	}
	window.scope.pagedata.choose_url=function(to,field,query){
		//默认都选择action模式
		//if(query){
			query='action';
		//}
		var webid=scope.pagedata.item.web_id
		window.scope.choose_link(to,field,query,'core/website.mobile_web/link/onlyplugin='+scope.pagedata.onlyplugin,webid);
	}

</script>
<script type="text/javascript">
require(['sortable'],function(Sortable){
	var byId = function (id) { return document.getElementById(id); };
	Sortable.create(byId('editor'), {
		animation: 150,
		draggable:'.drag',
		handle: '.drag',
		onEnd: function (evt) {
			var item=scope.pagedata.item.items.splice(evt.oldIndex,1);
			scope.pagedata.item.items.splice(evt.newIndex,0,item[0]);
		}
	});
	
});
</script>